<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app"></div>
</body>
<script type="text/x-template" id="mytemplate">
    <div>
    <p>Hello hello hello {{ num}}
        <div>{{info.age}}</div>
        <button @click="setInfo">赋值</button>
    </p>
</div>
  </script>
<script>
    new  Vue({
        el:"#app",
        data:{
            num:10,
            info:{
                num:10
            }
        },
        template:"#mytemplate",
        methods:{
            setInfo(){
                this.info.age =18;
                this.$forceUpdate();
            }
        }
    })

</script>
</html>